﻿<!-- #include file="mymin.asp" -->
<title>发送消息</title></head><body><div class='main400'>
<%

dim id,a,rs,sql

id=getN("id",0)
a=getN("a",0)

if a=0 then
	set rs=Server.CreateObject("ADODB.Recordset")
	sql = "select name from 74hu_user where id="&id
	rs.open sql,myconn,1,1
	If Not rs.eof Then
		w "会员:"&nowml(rs("name"))&" (ID:"&id&")<br/><form method='post' action='msg.asp'>内容:<br/><textarea name='msg' cols='45' rows='10'></textarea>"&_
			"<br/><input type='submit' value='发送消息'/>"&_
			"<input type='hidden' name='sid' value='"&sid&"'/><input type='hidden' name='id' value='"&id&"'/><input type='hidden' name='a' value='1'/>"&_
			"</form>"'以后补充消息类型
	Else
		w "iD:"&id&"会员不存在！<br/>"
	end if
	rs.close
	set rs=nothing
elseif a=1 then
	Dim msg
	msg=getD("msg","")
	If msg<>"" Then
		myconn.Execute("insert into 74hu_message (userid,receive,savetime,content,state,flag)values(1,"&id&",'"&time_now&"','"&msg&"',0,0)")
		w "发送成功!<br/>"
	Else
		w "消息内容不能为空!<br/>"
	End If
else
	w "操作失败!<br/>"
end if

w "----------<br/><a href='detail.asp?sid="&sid&"&amp;id="&id&"'>[会员管理]</a>"
call bbsLast
%>